import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/view/Login'
import homepage from '@/view/homepage'
import index from '@/view/index'
import addexam from '@/view/addexam'
import addcourse from '@/view/addcourse'
import addplan from '@/view/addplan'
import addschedule from '@/view/addschedule'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/homepage',
      name: 'homepage',
      component: homepage,
      redirect: '/index',
      children: [
        {
          path: '/index',
          name: 'index',
          component: index
        },
        {
          path: '/addexam',
          name: 'addexam',
          component: addexam
        },
        {
          path: '/addcourse',
          name: 'addcourse',
          component: addcourse
        },
        {
          path: '/addplan',
          name: 'addplan',
          component: addplan
        },
        {
          path: '/addschedule',
          name: 'addschedule',
          component: addschedule
        }
      ]
    }
  ]
})
